﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  xmlns:VMDS_GUIClient_ViewModels="clr-namespace:VMDS.GUIClient.ViewModels" x:Class="VMDS.GUIClient.Views.MyModalDialog"
             x:Name="root"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" >
	<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="ResourceDictionary1.xaml"/>
			</ResourceDictionary.MergedDictionaries>
			<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
		</ResourceDictionary>
	</UserControl.Resources>
	<UserControl.Visibility>
		<Binding Converter="{StaticResource BooleanToVisibilityConverter}" Path="Visible"/>
	</UserControl.Visibility>
	<UserControl.DataContext>
		<VMDS_GUIClient_ViewModels:DialogViewModel/>
	</UserControl.DataContext>
    <Grid Margin="0,1,0,-1" Visibility="{Binding Visible, Converter={StaticResource BooleanToVisibilityConverter}}">
        <Border Background="#90000000" Visibility="{Binding Visibility}">
        	            
            <Border BorderBrush="Black" BorderThickness="1" Background="AliceBlue" 
                        CornerRadius="10,0,10,0" VerticalAlignment="Center"
                       HorizontalAlignment="Center" Height="147.92" Width="210.36">
                
               
                
                <Grid Margin="10">
                    
                    <Grid.RowDefinitions>
                        
                        <RowDefinition />
                        
                        <RowDefinition Height="Auto" MinHeight="52.96" />
                        
                    </Grid.RowDefinitions>
                    
                    <TextBlock x:Name="MessageTextBlock" TextWrapping="Wrap" Margin="5" IsEnabled="False" Text="{Binding Message}" FontWeight="Bold" TextAlignment="Justify" />
                    <ProgressBar Height="10" Margin="8,8,8,0" Grid.Row="1" VerticalAlignment="Top" IsIndeterminate="{Binding IsIndeterminate}" Visibility="{Binding ProgressBar, Converter={StaticResource BooleanToVisibilityConverter}}" Value="{Binding Progress}"/>
                    <StackPanel Margin="0" Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Center">
                    	<StackPanel Margin="0" Orientation="Horizontal">
                    		<Button x:Name="OkButton"  Content="Ok" Margin="0,0,46.99,0" Style="{DynamicResource GreenButton}" Height="27.333" FontSize="13.333" FontWeight="Bold" Visibility="{Binding OkButton, Converter={StaticResource BooleanToVisibilityConverter}}" Command="{Binding OkClick, Mode=OneWay}" Width="50"  />
                    		<Button x:Name="YesButton"  Content="Да" Margin="0,0,46.99,0" Style="{DynamicResource GreenButton}" Height="27.333" FontSize="13.333" FontWeight="Bold" Command="{Binding YesClick, Mode=OneWay}" Width="50" Visibility="{Binding YesButton, Converter={StaticResource BooleanToVisibilityConverter}}"  />
                    		<Button x:Name="CancelButton"  Content="Отмена" Margin="0" Style="{DynamicResource GreenButton}" Height="27.333" FontSize="13.333" FontWeight="Bold" Width="55" Visibility="{Binding CancelButton, Converter={StaticResource BooleanToVisibilityConverter}}" Command="{Binding CancelClick, Mode=OneWay}" />
                    		<Button x:Name="NoButton"  Content="Нет" Margin="0" Style="{DynamicResource GreenButton}" Height="27.333" FontSize="13.333" FontWeight="Bold" Width="50" Visibility="{Binding NoButton, Converter={StaticResource BooleanToVisibilityConverter}}" Command="{Binding NoClick, Mode=OneWay}" />
                    	</StackPanel>
                    </StackPanel>
                    
                </Grid>
                
            </Border>
            
        </Border>
        
    </Grid>

</UserControl>
